package io.gbznt.modules.buss.constatnt;

/**
 * 农田状态；
 */
public enum MaintainTaskSourceTypeEnum {
	/**
	 * 后台添加
	 */
	SYSTEM(0, "后台添加"),
	/**
	 * 告警添加
	 */
	WARNING(1, "告警添加");

	private final int value;

	private final String description;

	private MaintainTaskSourceTypeEnum(int value, String description) {
		this.value = value;
		this.description = description;
	}

	public int getValue() {
		return value;
	}

	public String getDescription() {
		return description;
	}

	public static MaintainTaskSourceTypeEnum getByValue(Integer value) {
		if (null == value) {
            return null;
        }
		for (MaintainTaskSourceTypeEnum enumObj : MaintainTaskSourceTypeEnum.values()) {
			if (value.equals(enumObj.getValue())) {
                return enumObj;
            }
		}
		return null;
	}

	public static MaintainTaskSourceTypeEnum getByDesc(String description) {
		if (null == description) {
            return null;
        }
		for (MaintainTaskSourceTypeEnum enumObj : MaintainTaskSourceTypeEnum.values()) {
			if (description.equals(enumObj.getDescription())) {
                return enumObj;
            }
		}
		return null;
	}

}